But the correct way of thinking is like this: Joseph and Mary went from Nazareth to Bethlehem. Then, after seeing the Magi, they left Bethlehem and went to Egypt, and after Herod died they went back to their point of origin, namely Nazareth. It's all bullshit.
I went ahead and fixed that for you. You're welcome.